plot_bv_maga = \(data, var){
  data = data |> 
    filter(pid %in% c("Democrat","Republican")) |> 
    mutate(maga_pid = case_when(
      pid == "Democrat" ~ "Democrat",
      maga == 1 ~ "MAGA Republican",
      is.na(maga) | maga %in% 2:3 ~ "Non-MAGA Republican"
    )) |> 
    ungroup()
  
  p_age_dat = data |> 
    filter(pid %in% c("Democrat","Republican")) |> 
    mutate(age = year(date) - birthyr) |> 
    select(age, {{ var }}, weight, maga_pid,uid) |> 
    drop_na()
  p_age = p_age_dat |> 
    ggplot(aes(x = age, y = {{ var }}, weight = weight,
               group = maga_pid, color = maga_pid)) +
    geom_smooth(data = filter(p_age_dat, maga_pid == "Democrat"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_age_dat, maga_pid == "Democrat")$uid)) +
    geom_smooth(data = filter(p_age_dat, maga_pid == "Non-MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_age_dat, maga_pid == "Non-MAGA Republican")$uid)) +
    geom_smooth(data = filter(p_age_dat, maga_pid == "MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_age_dat, maga_pid == "MAGA Republican")$uid)) +
    scale_y_continuous(breaks = c(1,3,5), limits = c(1,5),
                       labels = c("Strongly\noppose","Neither\nsupport\nnor oppose","Strongly\nsupport")) +
    scale_color_manual(values = c("blue","darkred","red")) +
    labs(x = NULL, y = NULL, subtitle = "Age") +
    theme_prl(base_family = "Helvetica") +
    theme(plot.margin = unit(c(0,25,0,0), "pt"),
          axis.text.x = element_text(size = rel(.9)),
          axis.text.y = element_text(size = rel(.9)))
  
  p_ideo_dat = data |> 
    filter(pid %in% c("Democrat","Republican"),
           ideo5 %in% c(1:5))  |> 
    select(ideo5, {{ var }}, weight, maga_pid,uid) |> 
    drop_na()
  p_ideo = p_ideo_dat |> 
    ggplot(aes(x = ideo5, y = {{ var }}, weight = weight,
               group = maga_pid, color = maga_pid)) +
    geom_smooth(data = filter(p_ideo_dat, maga_pid == "Democrat"),
                method = 'lm_robust', #show.legend = F,
                method.args = list(clusters = filter(p_ideo_dat, maga_pid == "Democrat")$uid)) +
    geom_smooth(data = filter(p_ideo_dat, maga_pid == "Non-MAGA Republican"),
                method = 'lm_robust', #show.legend = F,
                method.args = list(clusters = filter(p_ideo_dat, maga_pid == "Non-MAGA Republican")$uid)) +
    geom_smooth(data = filter(p_ideo_dat, maga_pid == "MAGA Republican"),
                method = 'lm_robust', #show.legend = F,
                method.args = list(clusters = filter(p_ideo_dat, maga_pid == "MAGA Republican")$uid)) +
    scale_y_continuous(breaks = c(1,3,5), limits = c(1,5),
                       labels = c("Strongly\noppose","Neither\nsupport\nnor oppose","Strongly\nsupport")) +
    scale_x_continuous(breaks = c(1,3,5),
                       labels = c("Very\nLiberal","Moderate","Very\nConservative")) +
    scale_color_manual(name = "Party", values = c("blue","darkred","red")) +
    labs(x = NULL, y = NULL, subtitle = "Conservativism") +
    theme_prl(base_family = "Helvetica") +
    theme(plot.margin = unit(c(0,20,0,0), "pt"),
          legend.position = c(0,.9),
          legend.background = element_rect(color = 'transparent'),
          axis.text.y = element_blank(),
          axis.text.x = element_text(size = rel(.9)))
  
  p_interest_dat = data |> 
    filter(pid %in% c("Democrat","Republican"),
           newsint %in% c(1:4)) |> 
    mutate(newsint = 5-newsint) |> 
    select(newsint, {{ var }}, weight, maga_pid,uid) |> 
    drop_na()
  p_interest = p_interest_dat |> 
    ggplot(aes(x = newsint, y = {{ var }}, weight = weight,
               group = maga_pid, color = maga_pid)) +
    geom_smooth(data = filter(p_interest_dat, maga_pid == "Democrat"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_interest_dat, maga_pid == "Democrat")$uid)) +
    geom_smooth(data = filter(p_interest_dat, maga_pid == "Non-MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_interest_dat, maga_pid == "Non-MAGA Republican")$uid)) +
    geom_smooth(data = filter(p_interest_dat, maga_pid == "MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_interest_dat, maga_pid == "MAGA Republican")$uid)) +
    scale_y_continuous(breaks = c(1,3,5), limits = c(1,5),
                       labels = c("Strongly\noppose","Neither\nsupport\nnor oppose","Strongly\nsupport")) +
    scale_x_continuous(breaks = c(1:4),
                       labels = c("Hardly\nat all","Only now\nand then",
                                  "Some of\nthe time","Most of\nthe time")) +
    scale_color_manual(values = c("blue","darkred","red")) +
    labs(x = NULL, y = NULL, subtitle = "Follows Political News") +
    theme_prl(base_family = "Helvetica") +
    theme(plot.margin = unit(c(0,25,0,0), "pt"),
          axis.text.x = element_text(size = rel(.9)),
          axis.text.y = element_text(size = rel(.9)))
  
  p_vote_dat = data |> 
    filter(pid %in% c("Democrat","Republican"),
           vote_importance %in% c(1:5)) |> 
    mutate(vote_importance = 6-vote_importance) |> 
    select(vote_importance, {{ var }}, weight, maga_pid,uid) |> 
    drop_na()
  p_vote = p_vote_dat |> 
    ggplot(aes(x = vote_importance, y = {{ var }}, weight = weight,
               group = maga_pid, color = maga_pid)) +
    geom_smooth(data = filter(p_vote_dat, maga_pid == "Democrat"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_vote_dat, maga_pid == "Democrat")$uid)) +
    geom_smooth(data = filter(p_vote_dat, maga_pid == "Non-MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_vote_dat, maga_pid == "Non-MAGA Republican")$uid)) +
    geom_smooth(data = filter(p_vote_dat, maga_pid == "MAGA Republican"),
                method = 'lm_robust', show.legend = F,
                method.args = list(clusters = filter(p_vote_dat, maga_pid == "MAGA Republican")$uid)) +
    scale_y_continuous(breaks = c(1,3,5), limits = c(1,5),
                       labels = c("Strongly\noppose","Neither\nsupport\nnor oppose","Strongly\nsupport")) +
    scale_x_continuous(breaks = c(1,3,5),
                       labels = c("Very un-\nimportant","Neither important\nnor unimportant",
                                  "Very\nimportant")) +
    scale_color_manual(values = c("blue","darkred","red")) +
    labs(x = NULL, y = NULL, subtitle = "Vote Efficacy") +
    theme_prl(base_family = "Helvetica") +
    theme(plot.margin = unit(c(0,20,0,0), "pt"),
          axis.text.y = element_blank(),
          axis.text.x = element_text(size = rel(.9)))
  
  fig_out = ((p_age + p_ideo) / (p_interest + p_vote))
  return(fig_out)
}